import { lazy } from "react";
import { Navigate } from "react-router-dom";

import Home from '../pages/home/Index'
import My from '../pages/my/Index'
let List=lazy(()=>import('../pages/list/Index'))
let User=lazy(()=>import('../pages/user/Index'))




export const homee=[
    {
        path:'/home/list',
        element:<List></List>,
        title:'首页'
    },
    {
        path:'/home/user',
        element:<User></User>,
        title:'订单'
    }
]


const router=[
    {
        path:'/',
        element:<Navigate to={'/home'}></Navigate>
    },
    {
        path:'/home',
        element:<Home></Home>,
        children:homee
    },
    {
        path:'/my',
        element:<My></My>
    }
]



export default router





